<div class="title">
  <div class="left">
     增加-企业员工分组
  </div>
  <div class="right">
    <%= link_to '返回', groups_users_url, :method => :get, :remote => true, :class => 'crud back' %>
  </div>
</div>
<%= form_for group,
      :url => create_group_users_url,
      :remote => true,
      :method => :post do |f| %>
  <dl class="grid_15">
    <dt class="grid_2">组名：</dt>
    <dd class="grid_12">
      <%= f.text_field :name %>
      <%= f.hidden_field :enterprise_id %>
    </dd>
  </dl>
  <dl class="grid_15">
    <dt class="grid_2">人员：</dt>
    <dd class="grid_12">
      <%= "无" if !current_user.enterprise.users.present?%>
      <%current_user.enterprise.users.each do |user|%>
        <%= check_box_tag "group[user_ids][]", user.id, group.users.include?(user) , :class => "no" %> <%= user.full_name %>
      <%end%>
    </dd>
  </dl>
  <dl class="grid_15">
    <dt class="grid_2">备注：</dt>
    <dd class="grid_12"><%= f.text_area :remark %></dd>
  </dl>
  <div class="grid_5 form_tool">
    <%= f.submit '保存' %>
    <%= link_to '返回', groups_users_url, :method => :get, :remote => true, :class => 'button' %>
  </div>
<% end %>